<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 字符串</title>
</head>
<body>

<p>转义序列 \\ 在字符串中插入反斜杠。</p>

<p id="demo"></p>

<script>

  var x = "字符 \\ 被称为反斜杠。";
  document.getElementById("demo").innerHTML = x;

</script>

</body>
</html>